﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using PSWebLogic;
using System.Configuration;
using System.Web.UI.MobileControls;

namespace IPSWeb.Logic
{
    public class IOManager
    {
        public static List<PSScript> GetPSScriptsInDirectory()
        {
            string path = ConfigurationManager.AppSettings["UserScriptsDirectoryPath"];
            List<PSScript> scripts = new List<PSScript>();
            foreach (var item in System.IO.Directory.GetFiles(path,"*.ps1"))
            {
                scripts.Add(new PSScript(){Path=item});

            }
            return scripts;
        }
    }
}
